package com.michael;

/**
 * Created by Administrator on 2019/3/17 0017.
 */
public abstract class Payment {
     public abstract String getName();
     public abstract double queryBalance(String uid);

     public ReturnMsg pay(String uid,double amount){
          if (queryBalance(uid) < amount)
               return new ReturnMsg("500","支付失败","余额不足");
          return new ReturnMsg("200","支付成功","支付金额："+amount);
     }
}
